#include<bits/stdc++.h>
#define all(a) a.begin(), a.end()
using i32 = int;
using u32 = unsigned int;
using i64 = long long;
using u64 = unsigned long long;
using vi  = std::vector<i32>;
using pii = std::pair<i32, i32>;
using vii = std::vector<pii>;
using vl  = std::vector<i64>;
using pll = std::pair<i64, i64>;
using vll = std::vector<pll>;

//std::mt19937 rng {std::chrono::steady_clock::now().time_since_epoch().count()};

template<class T = int>
std::vector<T> getv(int n, int start = 0) {
	std::vector<T> res(n + start);
	for(int i = 0; i < n + start; i++) {
		std::cin >> res[i];
	}
	return res;
}


int main(){
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);

	std::string s, t;
	std::cin >> s >> t;
	std::vector<std::string> ans;
	for(int i = 0; i < s.size(); i++) {
		if(s[i] > t[i]) {
			s[i] = t[i];
			ans.push_back(s);
		}
	}
	for(int i = s.size() - 1; i >= 0; i--) {
		if(s[i] < t[i]) {
			s[i] = t[i];
			ans.push_back(s);
		}
	}
	std::cout << ans.size() << "\n";
	for(auto x : ans) {
		std::cout << x << "\n";
	}

	
	return 0;
}